''***** PBINST.INC for Install  ********''


''pbinst.inc
''$INCLUDE 'setupapi.inc'
''$INCLUDE 'msdetect.inc'

''Constants-------------------------------------------
CONST CUSTOMDLL = "PBINST.DLL"

CONST TRUE  = 1
CONST FALSE = 0

CONST IDS_USER_NAME       = 113
CONST IDS_COMPANY_NAME    = 114
CONST IDS_EXPIRATION_COMM = 144  ''** unencrypted
CONST IDS_EXPIRATION      = 147  ''** encrypted
CONST IDS_EXPIRATIONDAY   = 145
CONST IDS_INITIAL_VERSION = 1
CONST IDS_CURRENT_VERSION = 2
CONST IDS_THEMEPACK_DLL_VERSION = 5
CONST IDS_THEMEPACK_NUM_MONTHS = 146
CONST IDS_APPNAME = 97
CONST MISC_DISK_SPACE     = 10240
CONST UPDATE_VERSION = 1
CONST COMMON_DLG_DISK_SPACE = 89248    ''Planner
CONST SOUND_DRV_DISK_SPACE  = 16540    ''Planner


CONST TEXT1 = 0
CONST TEXT2 = 1

''Dialog ID's
CONST WELCOME      = 100
CONST WELCOMESPLASH = 1600
CONST WELCOMEHELP  = 1100
CONST ASKQUIT      = 200
CONST DESTPATH     = 300
CONST DESTPATH1    = 1200
CONST DESTHELP     = 900
CONST EXITFAILURE  = 400
CONST EXITQUIT     = 600
CONST EXITSUCCESS  = 700
CONST EXITRESTART  = 2300
CONST OPTIONS      = 800
CONST APPHELP      = 900
CONST CBYESNO      = 1000
CONST CUSTINST     = 6200
CONST CUSTINST_NOOPT = 6201
CONST OPTIONSHELP  = 1300
CONST TOOBIG       = 6300
CONST BADPATH      = 6400
CONST CBGETNAMEORG = 7500
CONST CBBADNAME    = 7700
CONST MONTHLISTDLG = 5200
CONST MONTHHELP    = 1400
CONST STARTDATE    = 1500
CONST STARTDATE_NODAY = 2200
CONST DATEHELP     = 2000
CONST DATEHELP_NODAY = 2100
CONST REMOVEDLG    = 1700
CONST REMOVEHELP   = 2700
CONST CONFIRM      = 1800
CONST RESCHOICES   = 2400
CONST RESHELP      = 2600
CONST STARTDATE_INTL = 500
CONST DATEHELP_INTL = 2800
CONST BILLBOARD1   = 8100
CONST BILLBOARD2   = 8200
CONST BILLBOARD3   = 8300
CONST BILLBOARD1_30   = 8101
CONST BILLBOARD2_30   = 8202
CONST BILLBOARD3_30   = 8303


''Bitmap ID
CONST LOGO         = 1

''File Types
CONST THEMEPACK    = 1
CONST APPFILES     = 2

CONST SINGLEFILE = 1
CONST MULTIFILE  = 0
CONST DATAFILE = 2    ''** THEMEPAL
CONST DATAONLY = 3
CONST DATAMULTI = 4
CONST QUESTION = 1
CONST GRAPHIC  = 0
CONST MAXNUMTP = 20

CONST MAX_NUM_RES = 4  ''includes IND, XGA, VGA. and EGA

CONST ERR_FAIL = 21 ''general unrecoverable failure

'' Globals -------------------------------------------------------------------------
GLOBAL CUIDLL$
GLOBAL HELPPROC$
GLOBAL bRestart%
GLOBAL Install_Type%
GLOBAL iNumMonths%
GLOBAL iNumFiles%
GLOBAL bColor%
GLOBAL bAnimations%
GLOBAL bThemeFileType%
GLOBAL bThemeFormat%
GLOBAL bDDOnDay%
GLOBAL bNoExpire%
GLOBAL bInstallSound%
GLOBAL bInstallCommon%
GLOBAL bInstallCtl3D%
GLOBAL bIsMultimedia%
GLOBAL bAlarmSounds%
GLOBAL szInstallRes$
GLOBAL szExpireText$
GLOBAL bDoUpdate%
GLOBAL bWriteComm%
GLOBAL szReplacePath$
GLOBAL bConversion%

''GLOBAL SYSDATETIME$ ''System date and time.
GLOBAL DEST$        ''Default destination directory.
GLOBAL THEMEDEST$   ''default destination dir for theme pack
GLOBAL WINDRIVE$    ''Windows drive letter.
GLOBAL MONTHOPT%(24)    ''Option selection from Months option dialog.
GLOBAL MONTHLIST$(24)

GLOBAL THEME$
GLOBAL bThemeExists%
GLOBAL USERNAME$    ''used for personalize
GLOBAL USERORG$    ''used for personalize
GLOBAL DropDeadDate$ '' holds dropdead date for theme if exists
GLOBAL start_m%
GLOBAL start_y%
GLOBAL end_m%
GLOBAL end_y%
GLOBAL start_d%
GLOBAL end_d%

''CustInst list symbol names
GLOBAL APPNEEDS$      ''Option list costs per drive
GLOBAL THEMENEEDS$
GLOBAL EXTRACOSTS$  ''List of extra costs to add per drive
GLOBAL BIGLIST$     ''List of option files cost calc results (boolean)
GLOBAL BadFileList$  ''List of file NOT to be installed
GLOBAL bHasEnoughDiskSpace%

''ListBox symbol names
GLOBAL LISTITEMSIN$  ''List of strings to show in listbox
GLOBAL LISTITEMSOUT$  ''List of strings selected in listbox dlgproc

GLOBAL INIKEYS$     ''List of INI file keys to write
GLOBAL INISTRINGS$  ''List of strings to write
GLOBAL szInstIni$
GLOBAL ini$
GLOBAL iMaxNumTP%

''Dialog list symbol names
GLOBAL CHECKSTATES$
GLOBAL STATUSTEXT$
GLOBAL DRIVETEXT$
GLOBAL CONFIRMTEXTIN$

GLOBAL EXPIRATION$
GLOBAL SrcDir$

GLOBAL gnParentItems%

'' Function and Subroutine declarations -------------------------------------------

DECLARE SUB AddOptFilesToCopyList (ftype%)
DECLARE SUB RecalcOptFiles (ftype%)
DECLARE SUB RecalcPath
DECLARE SUB RecalcCopyList
DECLARE SUB SetDriveStatus
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION Month_Year_ToStr (imonth%, iyear%, szSeparator$) AS STRING
DECLARE FUNCTION ReadStrResource LIB "monthdlg.dll" (fpcPath$, iStrID%, fpcResult$, iBuffSize%) AS INTEGER
DECLARE FUNCTION WriteStrResource LIB "monthdlg.dll" (fpcPath$, iStrID%, fpcStrBuff$) AS INTEGER
DECLARE FUNCTION Encrypt LIB "PBINST.DLL" (fpcString$) AS INTEGER
DECLARE FUNCTION MakeListIniKeys LIB "PBINST.DLL" (fpcIni$, fpcThemePack$) as INTEGER
DECLARE FUNCTION PAD(szNum$) AS STRING
DECLARE FUNCTION ExpandMonthKey(szMonthKey$) AS STRING
Declare Function FindWindow Lib "User" (lpClassName As STRING, lpWindowName AS ANY) As Integer
DECLARE FUNCTION RemoveFileFromIniKey LIB "PBINST.DLL" (fpcIni AS STRING, fpcSection AS STRING, fpcKey AS STRING, fpcFile AS STRING) AS INTEGER
DECLARE FUNCTION DeleteProgmanItem LIB "PBINST.DLL" (fpcGroup AS STRING, fpcItem AS STRING) AS INTEGER
